<?php


namespace app\common\lib;

//封装返回 AIP
class Show
{
    //成功方法
    public static function success($data = [], $message = "ok")
    {
        $result = [
            "status" => config("status.success"),
            "message" => $message,
            "result" => $data,

        ];
        return json($result);
    }

    //失败方法
    public static function error($message = "error",$status = 0,$data = [] )
    {
        $result = [
            "status" => $status,
            "message" => $message,
            "result" => $data,

        ];
        return json($result);
    }
}